package com.wetech.demo.web3j.contracts.erc7913rsaverifier;

import java.math.BigInteger;
import java.util.Arrays;
import java.util.List;
import org.web3j.abi.TypeReference;
import org.web3j.abi.datatypes.Function;
import org.web3j.abi.datatypes.Type;
import org.web3j.abi.datatypes.generated.Bytes4;
import org.web3j.crypto.Credentials;
import org.web3j.protocol.Web3j;
import org.web3j.protocol.core.RemoteCall;
import org.web3j.protocol.core.RemoteFunctionCall;
import org.web3j.tx.Contract;
import org.web3j.tx.TransactionManager;
import org.web3j.tx.gas.ContractGasProvider;

/**
 * <p>Auto generated code.
 * <p><strong>Do not modify!</strong>
 * <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
 * or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the 
 * <a href="https://github.com/LFDT-web3j/web3j/tree/main/codegen">codegen module</a> to update.
 *
 * <p>Generated with web3j version 4.14.0.
 */
@SuppressWarnings("rawtypes")
public class ERC7913RSAVerifier extends Contract {
    public static final String BINARY = "6080604052348015600e575f5ffd5b506106c08061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063024ad3181461002d575b5f5ffd5b61004061003b366004610491565b61005d565b6040516001600160e01b0319909116815260200160405180910390f35b5f808061006c878901896105a9565b915091506100cd8660405160200161008691815260200190565b60408051601f198184030181526020601f8901819004810284018101909252878352919088908890819084018382808284375f920191909152508792508691506100f39050565b6100df576001600160e01b03196100e7565b62495a6360e31b5b98975050505050505050565b5f61014d6002866040516101079190610625565b602060405180830381855afa158015610122573d5f5f3e3d5ffd5b5050506040513d601f19601f820116820180604052508101906101459190610630565b858585610158565b90505b949350505050565b80515f9061010081108061016d575084518114155b1561017b575f915050610150565b5f5b818110156101f2575f610193826020850361033c565b90505f6101a38883016020015190565b90505f6101b38784016020015190565b9050808210156101c5575050506101f2565b808211806101d557506020850383145b156101e7575f95505050505050610150565b50505060200161017d565b505f6101ff86868661034e565b90505f5f5f6102148460328703016020015190565b6001600160f81b031916603160f81b036102595750720181898068304b0432400b281820100828002160651b91506bffffffffffffffffffffffff19905060346102b3565b600f1985850101516001600160f81b031916602f60f81b036102a65750700181798058304b0432400b28182010082160751b91506dffffffffffffffffffffffffffff19905060326102b3565b5f95505050505050610150565b80850360025b818110156102f057602081870101516001600160f81b0319908116146102e8575f975050505050505050610150565b6001016102b9565b5060208501516001600160f01b031916600160f01b14801561031f57508261031b8683016020015190565b1684145b801561032d5750858501518b145b9b9a5050505050505050505050565b5f8282188284100282185b9392505050565b60605f5f61035d868686610379565b91509150816103705761037060126103f0565b95945050505050565b5f606061038583610401565b156103a0575050604080515f808252602082019092526103e8565b8251855185516040516103bf92919084908a908a908a90602001610647565b604051602081830303815290604052915060208201818184518360055afa828452910160405291505b935093915050565b634e487b715f52806020526024601cfd5b5f805b82518110156104435782818151811061041f5761041f610676565b01602001516001600160f81b0319161561043b57505f92915050565b600101610404565b50600192915050565b5f5f83601f84011261045c575f5ffd5b50813567ffffffffffffffff811115610473575f5ffd5b60208301915083602082850101111561048a575f5ffd5b9250929050565b5f5f5f5f5f606086880312156104a5575f5ffd5b853567ffffffffffffffff8111156104bb575f5ffd5b6104c78882890161044c565b90965094505060208601359250604086013567ffffffffffffffff8111156104ed575f5ffd5b6104f98882890161044c565b969995985093965092949392505050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f83011261052d575f5ffd5b813567ffffffffffffffff8111156105475761054761050a565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156105765761057661050a565b60405281815283820160200185101561058d575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f604083850312156105ba575f5ffd5b823567ffffffffffffffff8111156105d0575f5ffd5b6105dc8582860161051e565b925050602083013567ffffffffffffffff8111156105f8575f5ffd5b6106048582860161051e565b9150509250929050565b5f81518060208401855e5f93019283525090919050565b5f610347828461060e565b5f60208284031215610640575f5ffd5b5051919050565b8681528560208201528460408201525f6100e761067061066a606085018861060e565b8661060e565b8461060e565b634e487b7160e01b5f52603260045260245ffdfea264697066735822122060be98ee2608ab78d6961a2454e4dc42fbff8db8845a3fea9593759d380e82d764736f6c634300081d0033";

    private static String librariesLinkedBinary;

    public static final String FUNC_VERIFY = "verify";

    @Deprecated
    protected ERC7913RSAVerifier(String contractAddress, Web3j web3j, Credentials credentials,
            BigInteger gasPrice, BigInteger gasLimit) {
        super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit);
    }

    protected ERC7913RSAVerifier(String contractAddress, Web3j web3j, Credentials credentials,
            ContractGasProvider contractGasProvider) {
        super(BINARY, contractAddress, web3j, credentials, contractGasProvider);
    }

    @Deprecated
    protected ERC7913RSAVerifier(String contractAddress, Web3j web3j,
            TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
        super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit);
    }

    protected ERC7913RSAVerifier(String contractAddress, Web3j web3j,
            TransactionManager transactionManager, ContractGasProvider contractGasProvider) {
        super(BINARY, contractAddress, web3j, transactionManager, contractGasProvider);
    }

    public RemoteFunctionCall<byte[]> verify(byte[] key, byte[] hash, byte[] signature) {
        final Function function = new Function(FUNC_VERIFY, 
                Arrays.<Type>asList(new org.web3j.abi.datatypes.DynamicBytes(key), 
                new org.web3j.abi.datatypes.generated.Bytes32(hash), 
                new org.web3j.abi.datatypes.DynamicBytes(signature)), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Bytes4>() {}));
        return executeRemoteCallSingleValueReturn(function, byte[].class);
    }

    @Deprecated
    public static ERC7913RSAVerifier load(String contractAddress, Web3j web3j,
            Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
        return new ERC7913RSAVerifier(contractAddress, web3j, credentials, gasPrice, gasLimit);
    }

    @Deprecated
    public static ERC7913RSAVerifier load(String contractAddress, Web3j web3j,
            TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
        return new ERC7913RSAVerifier(contractAddress, web3j, transactionManager, gasPrice, gasLimit);
    }

    public static ERC7913RSAVerifier load(String contractAddress, Web3j web3j,
            Credentials credentials, ContractGasProvider contractGasProvider) {
        return new ERC7913RSAVerifier(contractAddress, web3j, credentials, contractGasProvider);
    }

    public static ERC7913RSAVerifier load(String contractAddress, Web3j web3j,
            TransactionManager transactionManager, ContractGasProvider contractGasProvider) {
        return new ERC7913RSAVerifier(contractAddress, web3j, transactionManager, contractGasProvider);
    }

    public static RemoteCall<ERC7913RSAVerifier> deploy(Web3j web3j, Credentials credentials,
            ContractGasProvider contractGasProvider) {
        return deployRemoteCall(ERC7913RSAVerifier.class, web3j, credentials, contractGasProvider, getDeploymentBinary(), "");
    }

    @Deprecated
    public static RemoteCall<ERC7913RSAVerifier> deploy(Web3j web3j, Credentials credentials,
            BigInteger gasPrice, BigInteger gasLimit) {
        return deployRemoteCall(ERC7913RSAVerifier.class, web3j, credentials, gasPrice, gasLimit, getDeploymentBinary(), "");
    }

    public static RemoteCall<ERC7913RSAVerifier> deploy(Web3j web3j,
            TransactionManager transactionManager, ContractGasProvider contractGasProvider) {
        return deployRemoteCall(ERC7913RSAVerifier.class, web3j, transactionManager, contractGasProvider, getDeploymentBinary(), "");
    }

    @Deprecated
    public static RemoteCall<ERC7913RSAVerifier> deploy(Web3j web3j,
            TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
        return deployRemoteCall(ERC7913RSAVerifier.class, web3j, transactionManager, gasPrice, gasLimit, getDeploymentBinary(), "");
    }

    public static void linkLibraries(List<Contract.LinkReference> references) {
        librariesLinkedBinary = linkBinaryWithReferences(BINARY, references);
    }

    private static String getDeploymentBinary() {
        if (librariesLinkedBinary != null) {
            return librariesLinkedBinary;
        } else {
            return BINARY;
        }
    }
}
